<?php
	
	$Agent = $_SERVER['HTTP_USER_AGENT'];
	$m3u8_url = "http://m.dy4410.com/player/tvyun.php?url=".$mms;



	$content1  =  Get_html($m3u8_url,"html");
	//echo $Agent;
	//$content1  = str_replace("player/ckplayer.js", "http://www.dy4410.com/ckplayer/player/ckplayer.js", $content1);
	$content1  = str_replace("http://vip.", "?domain=", $content1);
	$content1  = str_replace(".com/", "&", $content1);
	$content1  = str_replace("video.php?", "", $content1);
	$content1  = str_replace("?domain=", "video.php?domain=", $content1);
	echo $content1;
	

?>

<?php

	function Get_html($urls,$types) {
		
		$headers = array(  
			'Accept'=>'  text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',  
			'Accept-Encoding'=>' gzip, deflate, sdch',  
			'Accept-Language'=>' ko',  
			'Connection'=>'  keep-alive',      
			'User-Agent'=>$Agent,  
		);
			
			$ch = curl_init($urls);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // ?取?据返回  
			curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); // 在?用 CURLOPT_RETURNTRANSFER ?候??取?据返回  
			curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
			
			$output = curl_exec($ch);
			if($types=="json"){
				$output = json_decode($output, true);
			} 
			curl_close($ch); 

		return $output;	
	}
	
?>